﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace LS.FrmUI
{
    public partial class FrmFitterKeyWords : Form
    {
        public FrmFitterKeyWords()
        {
            InitializeComponent();
        }
        string fifterPath = string.Empty;
        private void FrmFitterKeyWords_Load(object sender, EventArgs e)
        {
            fifterPath = Path.Combine(Application.StartupPath, "System.Data.Words.dll");
            if (!File.Exists(fifterPath))
            {
                File.WriteAllText(fifterPath, "");
            }
            else
            {
                txtKeyWords.Text = File.ReadAllText(fifterPath);
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                File.WriteAllText(fifterPath, txtKeyWords.Text);
                MessageBox.Show("保存成功");
            }
            catch (Exception ex)
            {
                MessageBox.Show("保存错误，错误代码42:"+ex.Message);
            }
        }

    }
}
